<!DOCTYPE html>
<html>
<head>
    <title>DOM Level 3 Load Save Example</title>
</head>
<body>
    <p>This example is known to work only in Opera.</p>
    <script type="text/javascript">
    
        var implementation = document.implementation;
        var parser = implementation.createLSParser(implementation.MODE_SYNCHRONOUS, null);
        var input = implementation.createLSInput();
        input.stringData = "<root/>";
        
        var xmldom = parser.parse(input);
        var newInput = implementation.createLSInput();
        newInput.stringData ="<child/>";
        
        parser.parseWithContext(newInput, xmldom.documentElement, parser.ACTION_APPEND_AS_CHILDREN);
        
        alert(xmldom.documentElement.firstChild.tagName);

        
    </script>
</body>
</html>
